import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '小区',
    align:"center",
    dataIndex: 'villiageId_dictText'
   },
   {
    title: '楼栋名称',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '类型',
    align:"center",
    dataIndex: 'type_dictText'
   },
   {
    title: '管家',
    align:"center",
    dataIndex: 'employeeId'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '小区',
    field: 'villiageId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"property_villiage,name,id"
     },
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入小区!'},
          ];
     },
  },
  {
    label: '楼栋名称',
    field: 'name',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入楼栋名称!'},
          ];
     },
  },
  {
    label: '类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"sys_dict,dict_name,dict_code"
     },
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入类型!'},
          ];
     },
  },
  {
    label: '管家',
    field: 'employeeId',
    component: 'Input',
  },
];
